import { http } from '@/utils/http'
import type {
  PlanDateList,
  GetPlanDateParams,
  GetPlanInDayParams,
  DoctorPlanInDay,
  CheckConditionParams,
} from '@/types/doctorPlan'

export const getPlanDateList = (data: GetPlanDateParams) => {
  return http<PlanDateList[]>({
    method: 'POST',
    url: '/registration/searchCanRegisterInDateRange',
    data,
  })
}

export const getPlanInDay = (data: GetPlanInDayParams) => {
  return http<DoctorPlanInDay[]>({
    method: 'POST',
    url: '/registration/searchDeptSubDoctorPlanInDay',
    data,
  })
}

export const checkCondition = (data: CheckConditionParams) => {
  return http<string>({
    method: 'POST',
    url: '/registration/checkRegisterCondition',
    data,
  })
}
